import request from '@/utils/request'
// 获取员工列表数据接口
export const getEmployeeAPI = (params) => {
  return request.get('/sys/user', { params })
}
export const exportExcelAPI = () => {
  return request.get('/sys/user/export', {
    responseType: 'blob' // 指定响应数据的类型为二进制类型
  })
}

// 下载员工模板接口
export const downloadExcelAPI = () => {
  return request.get('/sys/user/import/template', {
    responseType: 'blob' // 指定响应数据的类型为二进制类型
  })
}
// 上传员工列表的接口
export const uploadExcelAPI = (data) => {
  return request.post('/sys/user/import', data)
}

// 删除员工接口
export const delloadAPI = (id) => {
  return request.delete(`/sys/user/${id}`)
}
// 调取新增
export const addEmployeeAPI = (data) => {
  return request.post('/sys/user', data)
}

// 调取用户详情接口
export const getXqAPI = (id) => {
  return request.get(`/sys/user/${id}`)
}
// 调取修改员工信息的接口
export const updataEmployeeAPI = (data) => {
  return request.put(`/sys/user/${data.id}`, data)
}
